/**
 * @description global filters
 * @example {{ $filters.customFunction(params) }}
 * @author Zhangbin
 */

/**
 * format phone 134****2222
 * @param {phone} string
 */
export const phoneNumberFormatter = (phone: string): string => {
  if(phone) {
    const reg = /^(.{3}).*(.{4})$/;
    return phone.replace(reg,'$1****$2')
  } else {
    return ''
  }
}